<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" isELIgnored="false"%>
<!-- jstl jsp的标签 -->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><!-- 使用额外的或者自定义标签  prefix-->
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String path = request.getContextPath();//取项目名
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";//取协议 主机名 端口

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    <style type="text/css">
        #tab  tr > td img{ height:60px; width:60px}
    </style>
</head>
<body>
<!-- 为什么写标签能够达到 原始java代码输出的效果 ,背后有java读取到你的文本 利用反射调用方法完成输出
 语言 叫做 el表达式
-->
<input id="msg" value="${sessionScope.msg}" type="hidden">
<c:if test="${sessionScope.msg != null}">
    <script type="text/javascript">
        var msg = document.getElementById("msg").value;
        alert(msg);
    </script>
    <c:remove var="msg" scope="session" />
</c:if>
<table id="tab" border="1">
    <tr>
        <td>节日编号</td>
        <td>节日名称</td>


    </tr>
    <c:forEach items="${festivals}" var="festival">
        <tr>

            <td>${festival.fid}</td>
            <td>${festival.fname}</td>
        </tr>
    </c:forEach>
</table>

</body>
</html>